// index.js


Page({
	data: {
		name: "张三",
		age: 20,
		friends:[
			{name:"张三",age:18},
			{name:"李四",age:19},
			{name:"王五",age:20}
		]
  },
  dahai(e){
    wx.navigateTo({
      url: '/pages/dahai/index',
    })
  },
	showMessage: function (e) {
		console.log("showMessage", e)
	},
	setUserMessage(e) {
		this.setData({
			userName: "丁焕雯",
			userAge: 25,
		})
	},
	agePlus1(e) {
		let userAge = this.data.userAge //获取原来的年龄
			++userAge
		this.setData({
			"userAge": userAge
		})
	},
	whoAmI(e){
		let index=e.currentTarget.dataset.userIndex
		this.setData({index})
	}

})